package leecode

func maxBottlesDrunk(numBottles int, numExchange int) int {
	res := numBottles     //结果 一开始直接全部喝完
	balance := numBottles //空瓶
	for balance >= numExchange {
		res++                               // 用numExchange个空瓶交换 , 一次只用换一瓶水
		balance = balance + 1 - numExchange //得到一个空瓶 , 减少 numExchange个空瓶
		numExchange++
	}
	return res
}
